<%@ include file="../base/include.jsp"%>

<div class="well restore-password-form">
	<div class="page-header">
		<h3>Restore password</h3>
	</div>
	<div>
		Please, enter your nickname:
	</div>
	<form class="form-vertical">
		<div class="control-group">
			<input id="userEmail" name="userEmail"
				class="registration-form-input" type="text" />
		</div>
		<div class="control-group">
			<button type="submit" formmethod="post"
				formaction="<c:url value='/restorePassword'/>" class="btn btn-primary">Restore
				password</button>
		</div>
		<div class="control-group">
			<a style="float: right;" href="<c:url value='/' />">To login page</a>
		</div>
		<c:if test="${not empty errorMessage}">
			<div class="control-group" align="center">
				<span class="label label-important">${errorMessage}</span>
			</div>
		</c:if>
	</form>
</div>

<script type="text/javascript">
	var mail = new LiveValidation('userEmail', {
		validMessage : ' ',
		onlyOnBlur : true
	});
	mail.add(Validate.Presence, {
		failureMessage : "Email cannot be empty."
	});
	mail.add(Validate.Email, {
		failureMessage : 'Email address is incorrect.'
	});
</script>